home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / wildcat / gifcat.zip / GIFCAT.DOC < prev    next >
Text File  |  1992-01-20  |  11KB  |  260 lines

  1.                                  Karl Schneider
  2.                                  8505 Woodwick Ct.
  3. For Wildcat! 3.0x+ ONLY!         Tampa, FL 33615
  4. MS/PC-DOS 3.3 and up!            813-884-9661 voice day/eve
  5.                                               bbs midnite-0600 EST
  6.  
  7.  
  8. Version 1.1ß  (c) 1992 Karl Schneider.  If you use the programs in
  9. this package, you are requested to make a $10 contribution to the
  10. author; this will insure support and updates.  Any registration of
  11. $25 or more will entitle you to registration on ALL my Wildcat 3.x
  12. utilities!
  13.  
  14. GIFCAT.ZIP contains a library of GIF + WILDCAT 3.0x+ utilities which
  15. can be used to do a number of things!  Thanks to Bill Anton of The
  16. Polar Bear's Lair BBS, 410-531-5748 for suggesting some of these util-
  17. ities and providing some public domain C source code by Lee Daniel
  18. Crocker, some of which has been used in creating them.
  19.  
  20. If you're currently using WCPUTGIF, you need to check this one out!
  21.  
  22. This package contains the following files:
  23.  
  24. SHOWDESC.EXE  Program to display the description of any Wildcat 3x file.
  25. KILLDESC.EXE  Program to ERASE the description in any Wildcat 3x file.
  26. WCGIFPUT.EXE  Program to take the extracted description and place it,
  27.               along with the WxHxC of the .GIF file into the Wildcat!
  28.               File Description field.
  29. SCANFILE.BAT  A sample SCANFILE to automatically place this information
  30.               into UPloaded GIF files.
  31. - - - - - -
  32. TEST4GIF.EXE  Program to Quick-test a file for proper .GIF name.
  33.               Returns ERRORLEVEL 1 if not a GIF file.
  34. GIFDESC.EXE   Program to ADD, DELETE, or EXTRACT a DESCRIPTION to, from
  35.               or in a .GIF file
  36. MAKEGIFD.EXE  Program to generate a Description to be put into a .GIF
  37. GIFCAT.DOC    This File!
  38. PUT.BAT       Sample batch file to simplify adding description to GIFs
  39. TESTGIF.BAT   Sample batch file to VIEW any Internal GIF descrips
  40.  
  41.  
  42. The first 4 files, since they interface with WILDCAT 3.0x+ MUST be
  43. EXECUTED from the WILDCAT HOME DIRECTORY.  All of them support file
  44. sharing and can be used with nodes 'up'.  I suggest placing these AND
  45. the remaining ones in your PATH so they can be executed from anywhere.
  46.  
  47. I created the first 2 programs mainly for testing out this package,
  48. and decided to go ahead and include them, in case you may have some
  49. use for them:
  50.  
  51. SHOWDESC example:
  52.  
  53. showdesc somefile.ext
  54.  
  55. attempts to locate 'somefile.ext' in the Wildcat Files Database, and
  56. when (if) found, it simply displays the file name and its description.
  57.  
  58. KILLDESC example:
  59.  
  60. killdesc somefile.ext
  61.  
  62. finds 'somefile.ext', and if it is found, prints the name and descrip-
  63. tion as above, and asks, "Erase the description y/n ?".  If you enter
  64. Y (or y), the file description will be ERASED from the Wildcat record.
  65. Be careful with this one!
  66. ---------------------------------------------------------------------
  67. Now for the good stuff:
  68.  
  69. You are probably familiar with the procedure for storing a File Des-
  70. cription of a .ZIP file WITHIN the .ZIP itself (in a separate file
  71. called DESC.SDI or FILE_ID.DIZ) and which can be extracted, for ex-
  72. ample by my AUTODESC program, and automatically inserted into the
  73. Wildcat 3.x file record description during the SCAN procedure follow-
  74. ing an upload.  Similar programs are in use with PcBoard and others.
  75. This makes it easier to upload files, since you do not need to type
  76. in descriptions while on-line, and helps keep descriptions consistent
  77. on various boards, reducing confusion and duplication!
  78.  
  79. Now the same sort of thing can be done with .GIF files!  A Description
  80. can be 'stored' within the body of the .GIF file and then extracted
  81. from it and inserted into the Wildcat Description automatically!
  82.  
  83. This description does NOT affect the viewing of the GIF file, and works
  84. on "GIFLITE-ed" files as well as standard GIFs.
  85.  
  86. OK.  First off, let's use the included TESTGIF.BAT to find out
  87. what description, if any, is already IN a GIF file.  Here's a copy:
  88.  
  89. @echo off
  90. REM testgif.bat
  91. if %1""=="" goto no_file
  92. gifdesc -v %1
  93. goto end
  94. :no_file
  95. echo ------------------
  96. echo Bad Filename.
  97. :end
  98.  
  99. This will ALWAYS SHOW THE Height_Width_Colors, EVEN IF THERE'S NO
  100. STORED TEXT DESCRIPTION!  The Text description, if it exists, will
  101. be shown on a SECOND LINE.
  102.  
  103. If there's no description, let's create one that can be put into
  104. the GIF file.  We use MAKEGIFD for this.  You can do this in a dir-
  105. ectory where GIF files are located, to minimize typing in pathnames.
  106.  
  107. To use MAKEGIFD, simply execute it with a GIF filename, for example:
  108. (assuming your current directory is the same as where the GIF is)
  109.  
  110. makegifd ramona.gif
  111.  
  112. The program will look at RAMONA.GIF, get its Width/Height/Colors and
  113. place them into the beginning of a 'description' field.  You then
  114. simply type in a brief description.  The program is very simple and
  115. intuitive.  Note that since WILDCAT only allows 60 characters in the
  116. file description, you will be limited to (60 minus the HxWxC) of the
  117. GIF, since this will be put into the WILDCAT description field by
  118. WCGIFPUT later.  When you finish, you will have a file called
  119. GIFDESC.SDI, containing ONLY the TEXT that you typed in!  The WxHxC
  120. does not need to be stored, since it is already inside the GIF.
  121.  
  122. Now let's see how to put this 'description' into the .GIF file.  The
  123. program GIFDESC is used to do this.  It's also used to DELETE and
  124. EXTRACT descriptions when necessary.
  125.  
  126. If you execute GIFDESC with no arguments, you will see this:
  127.  
  128. To INSERT GIFDESC.SDI: gifdesc -a [d:\path\]gifname[.gif] gifdesc.sdi
  129. To EXTRACT GIFDESC.SDI: gifdesc -v [d:\path\]gifname[.gif] > gifdesc.sdi
  130. To DELETE GIFDESC.SDI: gifdesc -d [d:\path\]gifname[.gif]
  131. [.gif] is optional. [\paths\] required if GIF in another dir.
  132.  
  133. OK, then, we want to use the FIRST option (after we have created our
  134. GIFDESC.SDI file) and type:
  135.  
  136. gifdesc -a ramona gifdesc.sdi
  137.  
  138. Now the description is stored inside RAMONA.GIF.  That's it!
  139. -----------------------------------------------------------------------
  140. "ARRGH...." you say, "that sounds complicated!!"
  141.  
  142. Yes you did, I heard you.  Hang on a second...do it with a batch file
  143. to make this all easier, something like PUT.BAT that looks like this:
  144.  
  145. @echo off
  146. REM put.bat
  147. if %1""=="" goto no_file
  148. REM gifdesc -d %1
  149. REM the above line can be un-REM'd to REMOVE any old description!
  150. makegifd %1
  151. if errorlevel 1 goto no_file
  152. gifdesc -a %1 gifdesc.sdi
  153. goto end
  154. :no_file
  155. echo
  156. echo ------------------
  157. echo Bad Filename.
  158. :end
  159.  
  160. -----------------------------------------------------------------------
  161. If you want to DELETE the description from RAMONA.GIF:
  162.  
  163. simply execute:  gifdesc -d ramona
  164.  
  165. You may want to un-REM the "gifdesc -d %1"  in the batch file to
  166. first clear out any old descriptions or junk that may be inside it.
  167. ----------------------------------------------------------------------------
  168. ----------------------------------------------------------------------------
  169. OK, what does all this have to do with UPLOADS?
  170.  
  171. I'm glad you asked!  If you're using my WCPUTGIF program, you probably
  172. have guessed what's coming now.  We are going to add commands to
  173. our SCANFILE.BAT file to extract the HxWxC from an uploaded .GIF file
  174. AS WELL AS THE INTERNAL DESCRIPTION (if it exists) - then we're going
  175. to place this into the Wildcat File Record Description field for that
  176. upload!
  177.  
  178. Here's an approximate copy of the included SCANFILE.BAT:
  179.  
  180. REM This is SCANFILE.BAT
  181. echo off
  182. REM you might have ZIPLAB or another gizmo here with something like
  183. REM cd\wc30\wcwork\node1
  184. REM wctest %1 \wc30\none\wctest.cfg
  185. REM and so forth....
  186. REM Our GIF package starts with the next CD command.  Don't forget it!
  187. cd \wc30
  188. if exist gifdesc.sdi del gifdesc.sdi
  189. test4gif %1
  190. if errorlevel 1 goto end
  191. REM errorlevel 1 here means it's not a .GIF file at all
  192. gifdesc -v %1 > gifdesc.sdi
  193. REM an errorlevel 1 here means a defective GIF header (the file's bad)
  194. if errorlevel 1 goto bad
  195. wcgifput %1
  196. goto end
  197. :bad
  198. copy \wc30\all.ok \wc\wcwork\node%WCNODEID%\scanfile.bad
  199. :end
  200.  
  201. Not much in here to change, except for the paths to your Wildcat
  202. directories.  If you already use other scanning utilities, it's best
  203. to run them first, and if possible let the batch file branch to :bad
  204. if there's a virus or whatever and save some time.  Take out the
  205. REMS if you want.
  206.  
  207. That's pretty much it!  Any questions?
  208.  
  209. Q: Yeah!  What does the guy uploading the file do when Wildcat asks for
  210.    its description???
  211.  
  212. A: If he has MAKEGIFD.EXE and GIFDESC.EXE and has USED them to insert
  213.    a description in the GIF file he's uploading, all he has to do is
  214.    press 'enter' when asked for Description.  You may want to make
  215.    up a little .ZIP of these 2 programs plus PUT.BAT with some simple
  216.    instructions and encourage your callers to download and use them!
  217.  
  218.  
  219. Q: Well, then, what if there is NO internal descrip, and he doesn't
  220.    type one in?
  221.  
  222. A: The description will contain ONLY the WxHxC of the GIF!
  223.  
  224.  
  225. Q: What if he types in a description anyway and there's one stored
  226.    inside the GIF?
  227.  
  228. A: He just wastes some time...the program will over-write it with the
  229.    internally stored description.
  230.  
  231.  
  232. Q: Wait a minute, I'm confused...let's say there is NO stored des-
  233.    cription in the GIF he uploads, and he DOES type in the description;
  234.    what happens then????
  235.  
  236. A: This is probably what will happen most of the time!  (Until
  237.    these utilities become more widely used...I hope!)  In this case,
  238.    it works just like WCPUTGIF - that is, it puts the WxHxC at the END of
  239.    the description.  Yep, it OVERWRITES the last 10 or 11 characters...
  240.    like this: 640x480x256.  You could end up with something like:
  241.  
  242.    Wow, dudes, this is the most awesome picture of mo640x320x64
  243.  
  244.    In which case the size & color is pretty much as meaningful as the
  245.    drivel he typed in....<grin>
  246.  
  247. ---------------------------------------------------------------------------
  248. This is a Beta release.  It has not been THOROUGHLY tested, but it's
  249. running on my system and Bill Anton's with no apparent problems.  If
  250. you use these programs, please understand that I make no warranty that
  251. any of them will or will not do anything.  I am fairly confident there
  252. is no danger to any data from their use, but will not be responsible
  253. for any consequences of using any programs in this package.  Any
  254. bug reports, complaints, kudos, or suggestion are welcome.  Please
  255. note that my telephone is VOICE in the DAY and EVENING, and BBS from
  256. MIDNIGHT UNTIL 0700 EASTERN TIME DAILY, however if I'm here and you
  257. need access in the daytime, I'll be happy to crank it up for you!
  258.  
  259. -eof-
  260.